<!-- 主页-请购单-查看 -->
<section id="container">
    <!--main content start-->
    <section id="main-content">
        <section class="wrapper">
            <!--state overview end-->
            <div class="row">
                <div class="col-lg-12">
                    <div class="ptop-list">
                        <section class="panel">
                            <header class="panel-heading">
                                基本信息
                            </header>
                            <div class="panel-body">
                                <div class="form-group customerForm">
                                    <label class="col-sm-2 control-label">项目名称</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" ng-model="headerMap.projName" disabled>
                                    </div>
                                </div>
                                <div class="form-group customerForm">
                                    <label class="col-sm-2 control-label">申请用途</label>
                                    <div class="col-sm-10">
                                        <input ng-model="headerMap.application" class="form-control" disabled></input>
                                    </div>
                                </div>
                                <div class="form-group customerForm">
                                    <label class="col-sm-2 control-label">归属分公司选择</label>
                                    <div class="col-sm-10">
                                        <input ng-model="headerMap.affiliationCode" class="form-control" disabled></input>
                                    </div>
                                </div>
                                <div class="form-group customerForm">
                                    <label class="col-sm-2 control-label">文件下载</label>
                                    <div class="col-sm-10">
                                        <a class="upload-icon" ng-click="disUploadPurchaseFile()">点击下载</a>
                                    </div>
                                </div>
                            </div>
                        </section>

                        <section class="panel">
                            <header class="panel-heading">
                                请购列表
                            </header>
                            <div class="panel-body">
                                <div id="purchaselogContainer" class="dlshouwen-grid-container"></div>
                                <div id="purchaselogToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                            </div>
                        </section>
                        <section class="panel">
                            <header class="panel-heading">
                                <div class="pro-search">
                                    资产库列表
                                </div>
                            </header>
                            <div class="panel-body">
                                <div id="assetslogContainer" class="dlshouwen-grid-container"></div>
                                <div id="assetslogToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                            </div>
                        </section>

                        <section class="panel">
                            <header class="panel-heading">申请说明</header>
                            <div class="panel-body" style="padding-bottom:0;">
                                <div class="form-group customerForm">
                                    <!-- <label class="col-sm-2 control-label">申请说明</label> -->
                                    <!-- <div class="col-sm-10"> -->
                                        <textarea class="form-control" maxlength="120" ng-model="headerMap.applyInstruction" disabled></textarea>
                                    <!-- </div> -->
                                </div>

                            </div>
                        </section>

                        <section class="panel">
                            <div class="panel-heading">
                                审批记录
                            </div>
                            <div class="panel-body">
                                <ul class="tp-ulst">
                                    <li>
                                        <span>人员姓名 </span><span>修改时间</span><span>处理结果</span>
                                    </li>
                                    <div ng-repeat="ss in processs">
                                        <li>
                                            <span>{{ss.USER}}</span><span>{{ss.time | date:'yyyy-MM-dd hh:mm'}}</span><span>{{getsssbbb(ss.lastStatus)}}，{{ss.msg}}</span>
                                        </li>
                                    </div>
                                </ul>
                            </div>
                        </section>
                    </div>

                    <section class="panel" id="printbox" style="display:none;">
                        <header class="panel-heading add-heading">
                            请购单
                            <span class="add-icon">编号：{{headerMap.brCode}}</span>
                        </header>
                        <div class="panel-body">
                            <table class="table table-bordered">
                                <tbody>
                                    <tr style="background:#999;color:#fff;">
                                        <td colspan="8"><strong>基本信息</strong></td>
                                    </tr>
                                    <tr>
                                        <td>项目名称</td>
                                        <td colspan="3">{{headerMap.projName}}</td>
                                        <td>申请日期</td>
                                        <td colspan="3">{{headerMap.applyTime | date:'yyyy-MM-dd'}}</td>
                                    </tr>
                                    <tr>
                                        <td>员工姓名</td>
                                        <td colspan="3">{{headerMap.applyManname}}</td>
                                        <td>部门名称</td>
                                        <td colspan="3">{{headerMap.departmentName}}</td>
                                    </tr>
                                    <tr>
                                        <td>申请用途</td>
                                        <td colspan="3">{{headerMap.application}}</td>
                                        <td>归属分公司</td>
                                        <td colspan="3">{{headerMap.affiliationCode}}</td>
                                    </tr>
                                    <tr>
                                        <td>总金额</td>
                                        <td colspan="7">{{headerMap.moneyTotal}}</td>
                                    </tr>
                                    <tr>
                                        <td>申请说明</td>
                                        <td colspan="7">{{headerMap.applyInstruction}}</td>
                                    </tr>
                                    <tr style="background:#999;color:#fff;">
                                        <td colspan="8"><strong>请购明细</strong></td>
                                    </tr>
                                    <tr style="font-weight:bold;">
                                        <td>类目</td>
                                        <td>类别</td>
                                        <td>名称</td>
                                        <td>品名及规格</td>
                                        <td>数量</td>
                                        <td>单价</td>
                                        <td>合计</td>
                                        <td>备注</td>
                                    </tr>
                                    <tr ng-repeat="sbsb in buyings">
                                        <td>{{sbsb.commodityCateName}}</td>
                                        <td>{{sbsb.commodityClassName}}</td>
                                        <td>{{sbsb.name}}</td>
                                        <td>{{sbsb.descAndSpec}}</td>
                                        <td>{{sbsb.quantity}}</td>
                                        <td>{{sbsb.singlePrice}}</td>
                                        <td>{{sbsb.estimatedAmount}}</td>
                                        <td>{{sbsb.remark}}</td>
                                    </tr>
                                    <tr style="background:#999;color:#fff;">
                                        <td colspan="8"><strong>审批记录</strong></td>
                                    </tr>
                                    <tr style="font-weight:bold;">
                                        <td>处理人</td>
                                        <td>处理时间</td>
                                        <td colspan="6">处理结果</td>
                                    </tr>
                                    <tr ng-repeat="ss in processs">
                                        <td>{{ss.USER}}</td>
                                        <td>{{ss.time | date:'yyyy-MM-dd hh:mm'}}</td>
                                        <td colspan="6">{{getsssbbb(ss.lastStatus)}}，{{ss.msg}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </section>

                    <section class="panel">
                        <div class="panel-body">
                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-primary btn-l10" id="word">导出word</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-success btn-l10" id="print">打印单据</a>
                            </p>
                        </div>
                    </section>
                </div>
            </div>
        </section>
    </section>
    <!--main content end-->
</section>

<script type="text/javascript" src="js/proinfo/purchase/purchaseInfo.js"></script>

<!-- 打印组件 -->
<script type="text/javascript" src="assets/print/jquery.jqprint-0.3.js"></script>

<!-- 导出word组件 -->
<script type="text/javascript" src="assets/html2word/FileSaver.js"></script>
<script type="text/javascript" src="assets/html2word/jquery.wordexport.js"></script>

<script>
    $(function () {
        //打印初始化  
        $("#print").click(function () {
            $(".ptop-list").hide();
            $("#printbox").show();
            $("#printbox").jqprint();
        })
        //导出word  
        $("#word").click(function () {
            $(".ptop-list").hide();
            $("#printbox").show();
            $("#printbox").wordExport();
        })
    })
</script>